<?php
declare(strict_types=1);

namespace LowCode\Abstracts;

use Illuminate\Support\Traits\Conditionable;
use LowCode\Support\Fluent;
use LowCode\Traits\HasMacroable;
use LowCode\Traits\HasMake;

abstract class Core extends Fluent
{
    use HasMake, HasMacroable, Conditionable;

    /**
     * @param string $key
     * @param mixed $value
     * @return $this
     */
    public function setAttribute(string $key,mixed $value): static
    {
        if ($this->get("locked")){
            return $this;
        }
        $this->attributes[$key] = $value;
        return $this;
    }
}
